import React from 'react'
import counter from '../../store/counter'
import { observer } from "mobx-react"

function CountUpdate() {
  return (
    <div>
      <button onClick={() => counter.increment(2)}>增加</button>
      <button onClick={() => counter.decrement(2)}>减少</button>
      <button onClick={() => counter.incrementAsync(2)}>延迟1S增加</button>
    </div>
  )
}

export default observer(CountUpdate) 
